<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    {{msg}}
    <comp1></comp1>
</div>
<template id="temp1">
    <h2>模版</h2>
</template>
<script src="node_modules/vue/dist/vue.js"></script>
<script>
    Vue.component("comp1", {
        template:"<div>{{msg2}}</div>",
        data(){
            return{
                msg2:"你好世界"
            }
        }
    })
    let vm = new Vue({
        // el:"#app",
        data:{
            msg:"hello world"
        }
    })
    vm.$mount("#temp1")
</script>
</body>
</html>